package com.frontend.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

@Configuration
public class ThreadPoolExecutorConfig {
    @Bean
   public ThreadPoolExecutor ThreadPoolExecutor(){
        return new ThreadPoolExecutor(
                10,
                30,
                30,
                TimeUnit.SECONDS,
                new ArrayBlockingQueue<>(5)
        ) ;
    }
}
